Supercharging CP/M by Randy Winchester Operating System Components The CP/M Plus operating system consists of three modules. The CCP (Console Command Processor), is the part of CP/M that you see when you first boot the system. The CCP prints the A> disk prompt, accepts user input, and loads commands from disk. The BDOS (Basic Disk Operating System) handles the CP/M functions of disk, console, and printer input/output, and the tasks of file management. The BIOS (Basic Input Output System) does the real input/output work for the BDOS. The BIOS contains the code customized for the CP/M hardware that you're using. On the C128, the BIOS contains the routines for driving the 40 and 80 column screens, using the REU as a RAM drive, and reading/writing several different disk formats on 1571 and 1581 drives. The BIOS can be thought of as a collection of device drivers that are specific to your computer. What's New - BIOS-R6 BIOS-R6 (C128 BIOS modified by Randy Winchester and others) is the latest of the modified versions of the C128 CP/M BIOS. Most of the changes to the BIOS result in faster processing speed. For example, all the code for driving a 40 column screen has been removed. Almost everyone using CP/M is going to be using it in 80 columns anyway. Cutting this code takes a big load off the system and increases overall speed by about 15%. Similarly, the interrupt driven RS232 has been set from 300 to 75 baud. The higher the baud rate, the more processor time is required to service RS232. Since the RS232 code is always running, decreasing the baud rate frees up cycles that the processor needs to service RS232. This doesn't affect the operation of terminal programs which explicitly set the baud rate when they start up. Other features of BIOS-R6 include a screen dump function, commented source to assist the programmer in producing customized systems, and support for additional disk formats. Some of the new disk formats include Commodore's standard 1581 CP/M format, MAXI 71 (398K on 5.25" disks), and GP 1581 (796K on 3.5" disks). C128 CP/M programmers who want to add or change operating system features should try to make changes to the BIOS. For one thing, BIOS source code is available, but not available for the BDOS or CCP. (Source code is not available for the BDOS and CCP replacements mentioned in this article either). Another reason is that the BDOS and CCP are intended to be "invariable" operating system components - that is, they are identical for different computers that run CP/M Plus. A study of the BIOS source code will reveal segments of code that can be removed if they aren't needed, and will provide hints as to new features that can be added. The distribution package, BIOS-R6.LBR includes documentation, source code, utilities, and support files. BIOS-R6.LBR also contains the latest version of ZPM3. [Ed. Note: The files mentioned in this article can be found via anonymous FTP or via the mailserver through the "psend" command.] ZPM3 Features ZPM3 is a replacement BDOS by Simeon Cran. Since the BDOS is supposed to be "invariable," why would anyone want to replace it? The answers to that are pretty typical - bug fixes, speed enhancements, and new features! ZPM3 interacts with the BIOS and CCP in most of the same ways as the standard Digital Research BDOS, and for the most part appears to be a clone of the standard BDOS. The standard BDOS was coded in 8080 assembly to make it compatible with machines that use the older slower 8080 processor. Very few (if any) CP/M Plus machines used the 8080. ZPM3 is coded in faster, compact Z80 assembly language, for the Z80 processor that is at the heart of most CP/M Plus computers (including the C128). The ZPM3 documentation details fixes to several bugs that have plagued CP/M Plus since day one. Although the bugs sound somewhat obscure, there's no telling when one might cause problems. ZPM3 is much faster than standard CP/M Plus. The increased speed should be obvious after using it for a short time. The new features offered by ZPM3 are remarkable. Three closely related features are enhanced command line editing, a history buffer that stores and recalls multiple commands, and Automatic Command Prompting. These features work in concert to provide a flexible and convenient command line interface. Command line editing now has 20 control key functions for moving or deleting by characters or whole words. The most recent command lines (up to 250 characters) are stored in the history buffer, and can be recalled and reused, or reedited if necessary. Automatic Command Prompting is best appreciated if seen in action. It's similar to command line completion in Unix, except that it's automatic, with matching responses coming directly from the history buffer. If you've recently entered a long command line with lots of options, and need to reuse it (or edit it slightly first), typing the first few unique characters will bring back the entire command from the history buffer if it's still intact. Automatic Command Prompting is so radical that it might take some getting used to. If you don't think you can get used to it, it can be shut off. The latest version of ZPM3, ZPM3N08.ARK, is included inside BIOS-R6.LBR, and can also be found as a separate file.